package com.tlgen.orm.model;

import com.tlgen.orm.annotation.AutoFill;
import com.tlgen.orm.annotation.CursorField;
import com.tlgen.orm.annotation.Id;
import com.tlgen.orm.enums.FillType;
import lombok.Data;

import java.time.LocalDateTime;

@Data
public class BaseEntity<ID> extends Page {

    @Id
    @CursorField
    private ID id;
    @AutoFill(FillType.INSERT)
    private Integer enable;
    @AutoFill(FillType.INSERT)
    private String createBy;
    @AutoFill(FillType.INSERT)
    private String createByUserId;
    @AutoFill(FillType.INSERT)
    private LocalDateTime createTime;
    @AutoFill(FillType.UPDATE)
    private String updateBy;
    @AutoFill(FillType.UPDATE)
    private String updateByUserId;
    @AutoFill(FillType.UPDATE)
    private LocalDateTime updateTime;
    @AutoFill({FillType.INSERT, FillType.DELETE})
    private Integer delFlag;

}
